/** * 配置管理 文件配置 */
<template>
  <div>
    <!-- 面包屑导航 -->
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>文件配置</el-breadcrumb-item>
    </el-breadcrumb>
    <!-- 搜索筛选 -->
    <el-form :inline="true" :model="formInline" class="user-search">
      <el-form-item label="搜索：">
        <el-input
          size="small"
          v-model="formInline.dbName"
          placeholder="请输入数据库名称"
        ></el-input>
      </el-form-item>
      <el-form-item label="">
        <el-input
          size="small"
          v-model="formInline.tableName"
          placeholder="请输入表名"
        ></el-input>
      </el-form-item>
      <el-form-item>
        <el-select
          size="small"
          v-model="formInline.executeFrequency"
          placeholder="请选择取数周期"
        >
          <el-option
            v-for="executeFrequency in executeFrequencyList"
            :label="executeFrequency.key"
            :value="executeFrequency.value"
            :key="executeFrequency.value"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button
          size="small"
          type="primary"
          icon="el-icon-search"
          @click="search"
          >搜索</el-button
        >
        <el-button
          size="small"
          type="primary"
          icon="el-icon-plus"
          @click="handleEdit('', null, addFlag)"
          >添加</el-button
        >
      </el-form-item>
    </el-form>
    <!--文件配置列表-->
    <el-table
      size="small"
      :data="listData"
      highlight-current-row
      v-loading="loading"
      border
      stripe
      element-loading-text="拼命加载中"
      style="width: 100%;"
    >
      <el-table-column align="center" type="index" width="60">
      </el-table-column>
      <el-table-column
        prop="dbName"
        label="数据库名称"
        width="200"
        show-overflow-tooltip
      >
      </el-table-column>
      <el-table-column
        prop="tableName"
        label="数据表名称"
        width="120"
        show-overflow-tooltip
      >
      </el-table-column>
      <el-table-column
        prop="sendSysCode"
        label="发送系统号"
        width="100"
        show-overflow-tooltip
      >
      </el-table-column>
      <el-table-column
        prop="areaCode"
        label="区域编码"
        width="140"
        show-overflow-tooltip
      >
      </el-table-column>
      <el-table-column
        prop="dataCreateDate"
        label="数据创建时间"
        width="100"
        show-overflow-tooltip
      >
      </el-table-column>
      <el-table-column
        prop="updateFlag"
        label="是否更新"
        width="120"
        show-overflow-tooltip
      >
      </el-table-column>
      <el-table-column
        prop="deleteFlag"
        label="是否删除"
        width="180"
        show-overflow-tooltip
      >
      </el-table-column>
      <el-table-column
        prop="fileSuffix"
        label="数据文件后缀"
        width="140"
        show-overflow-tooltip
      >
      </el-table-column>
      <el-table-column
        prop="filePath"
        label="文件存放路径"
        width="150"
        show-overflow-tooltip
      >
      </el-table-column>
      <el-table-column
        prop="dataCount"
        label="文件数据量"
        width="150"
        show-overflow-tooltip
      >
      </el-table-column>
      <el-table-column
        prop="executeFrequency"
        label="取数周期"
        width="150"
        show-overflow-tooltip
      >
      </el-table-column>
      <el-table-column
        prop="remark"
        label="备注"
        width="150"
        show-overflow-tooltip
      >
      </el-table-column>
      <el-table-column align="center" label="操作" width="300px">
        <template slot-scope="scope">
          <el-button size="mini" @click="listField(scope.$index, scope.row)"
            >字段</el-button
          >
          <el-button
            size="mini"
            @click="handleEdit(scope.$index, scope.row, editFlag)"
            >编辑</el-button
          >
          <el-button
            size="mini"
            type="danger"
            @click="deleteConfigInfo(scope.$index, scope.row)"
            >删除</el-button
          >
        </template>
      </el-table-column>
    </el-table>
    <!-- 分页组件 -->
    <Pagination
      v-bind:child-msg="pageparm"
      @callFather="callFather"
    ></Pagination>
    <!-- 添加 编辑界面 -->
    <el-dialog
      :title="title"
      :visible.sync="editFormVisible"
      width="80%"
      @click="closeDialog('editForm')"
    >
      <el-form
        :inline="true"
        label-width="120px"
        :model="editForm"
        :rules="rules"
        ref="editForm"
      >
        <el-form-item label="发送方系统代码" prop="sendSysCode">
          <el-input
            size="small"
            v-model="editForm.sendSysCode"
            auto-complete="off"
            placeholder="请输入发送方系统代码"
          ></el-input>
        </el-form-item>
        <el-form-item label="数据库名称" prop="dbName">
          <el-input
            size="small"
            v-model="editForm.dbName"
            auto-complete="off"
            placeholder="请输入数据库名称"
          ></el-input>
        </el-form-item>
        <el-form-item label="数据库用户名称" prop="userName">
          <el-input
            size="small"
            v-model="editForm.userName"
            auto-complete="off"
            placeholder="数据库用户名称"
          ></el-input>
        </el-form-item>
        <el-form-item label="接口数据表名称" prop="tableName">
          <el-input
            size="small"
            v-model="editForm.tableName"
            auto-complete="off"
            placeholder="请输入接口数据表名称"
          ></el-input>
        </el-form-item>
        <el-form-item label="区域编码" prop="areaCode">
          <el-input
            size="small"
            v-model="editForm.areaCode"
            auto-complete="off"
            placeholder="请输入区域编码"
          ></el-input>
        </el-form-item>
        <el-form-item label="数据创建日期" prop="dataCreateDate">
          <el-date-picker
            size="small"
            v-model="editForm.dataCreateDate"
            type="date"
            placeholder="选择数据创建日期"
            value-format="yyyyMMdd"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="是否更新" prop="updateFlag">
          <el-select
            size="small"
            v-model="editForm.updateFlag"
            placeholder="请选择更新标识"
            class="userRole"
            style="width: 200px;"
          >
            <el-option
              v-for="updateFlag in updateFlagList"
              :label="updateFlag.key"
              :value="updateFlag.value"
              :key="updateFlag.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="是否物理删除" prop="deleteFlag">
          <el-select
            size="small"
            v-model="editForm.deleteFlag"
            placeholder="请选择删除标识"
            class="userRole"
            style="width: 200px;"
          >
            <el-option
              v-for="deleteFlag in deleteFlagList"
              :label="deleteFlag.key"
              :value="deleteFlag.value"
              :key="deleteFlag.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="增全量标识" prop="dataType">
          <el-select
            size="small"
            v-model="editForm.dataType"
            placeholder="请选择增全量标识"
            class="userRole"
            style="width: 200px;"
          >
            <el-option
              v-for="dataType in dataTypeList"
              :label="dataType.key"
              :value="dataType.value"
              :key="dataType.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="批次号" prop="batchNo">
          <el-input
            size="small"
            v-model="editForm.batchNo"
            auto-complete="off"
            placeholder="请输入批次号"
          ></el-input>
        </el-form-item>
        <el-form-item label="文件序号" prop="fileSeqNo">
          <el-input
            size="small"
            v-model="editForm.fileSeqNo"
            auto-complete="off"
            placeholder="请输入文件序号"
          ></el-input>
        </el-form-item>
        <el-form-item label="主键字段" prop="primaryKeys">
          <el-input
            size="small"
            v-model="editForm.primaryKeys"
            auto-complete="off"
            placeholder="字段之间使用英文逗号分隔"
          ></el-input>
        </el-form-item>
        <el-form-item label="字段" prop="fieldNames">
          <el-input
            size="small"
            :disabled="true"
            v-model="editForm.fieldNames"
            auto-complete="off"
            placeholder="字段之间使用英文逗号分隔"
          ></el-input>
        </el-form-item>
        <el-form-item label="字段属性" prop="fieldAttrNames">
          <el-input
            size="small"
            v-model="editForm.fieldAttrNames"
            auto-complete="off"
            placeholder="属性之间使用英文逗号分隔"
          ></el-input>
        </el-form-item>
        <el-form-item label="取数周期" prop="executeFrequency">
          <el-select
            size="small"
            v-model="editForm.executeFrequency"
            placeholder="请选择取数周期"
            style="width: 200px;"
          >
            <el-option
              v-for="executeFrequency in executeFrequencyList"
              :label="executeFrequency.key"
              :value="executeFrequency.value"
              :key="executeFrequency.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="文件存放路径" prop="filePath">
          <el-input
            size="small"
            v-model="editForm.filePath"
            auto-complete="off"
            placeholder="请输入文件存放路径"
          ></el-input>
        </el-form-item>
        <el-form-item label="数据文件后缀" prop="fileSuffix">
          <el-input
            size="small"
            v-model="editForm.fileSuffix"
            auto-complete="off"
            placeholder="请输入数据文件后缀"
          ></el-input>
        </el-form-item>
        <el-form-item label="查询条件表达式" prop="queryConditionExpression">
          <el-input
            size="small"
            v-model="editForm.queryConditionExpression"
            auto-complete="off"
            placeholder="请输入查询条件表达式"
          ></el-input>
        </el-form-item>
        <el-form-item v-if="isEdit" label="处理状态" prop="status">
          <el-select
            size="small"
            v-model="editForm.status"
            placeholder="请选择处理状态"
            style="width: 200px;"
          >
            <el-option
              v-for="status in statusList"
              :label="status.key"
              :value="status.value"
              :key="status.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="文件数据量" prop="dataCount">
          <el-input
            size="small"
            v-model="editForm.dataCount"
            auto-complete="off"
            placeholder="请输入单个数据文件的数据量"
          ></el-input>
        </el-form-item>
        <el-form-item label="单次取数数据量" prop="pageSize">
          <el-input
            size="small"
            v-model="editForm.pageSize"
            auto-complete="off"
            placeholder="请输入单次取数的数据量"
          ></el-input>
        </el-form-item>
        <!-- <el-divider content-position="left">校验文件配置</el-divider> -->
        <el-form-item label="数据表类型" prop="tableType">
          <el-select
            size="small"
            v-model="editForm.tableType"
            placeholder="请选择数据表类型"
            style="width: 200px;"
          >
            <el-option
              v-for="tableType in tableTypeList"
              :label="tableType.key"
              :value="tableType.value"
              :key="tableType.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="校验主键字段" prop="checkPrimaryKeys">
          <el-input
            size="small"
            v-model="editForm.checkPrimaryKeys"
            auto-complete="off"
            placeholder="字段之间使用英文逗号分隔"
          ></el-input>
        </el-form-item>
        <el-form-item label="校验字段" prop="checkFieldNames">
          <el-input
            size="small"
            :disabled="true"
            v-model="editForm.checkFieldNames"
            auto-complete="off"
            placeholder="字段之间使用英文逗号分隔"
          ></el-input>
        </el-form-item>
        <el-form-item label="校验字段属性" prop="checkFieldAttrNames">
          <el-input
            size="small"
            v-model="editForm.checkFieldAttrNames"
            auto-complete="off"
            placeholder="属性之间使用英文逗号分隔"
          ></el-input>
        </el-form-item>
        <el-form-item label="统计表达式" prop="expression">
          <el-input
            size="small"
            v-model="editForm.expression"
            auto-complete="off"
            placeholder="请输入统计表达式"
          ></el-input>
        </el-form-item>
        <el-form-item label="备注" prop="remark">
          <el-input
            size="small"
            v-model="editForm.remark"
            auto-complete="off"
            placeholder="备注"
          ></el-input>
        </el-form-item>
        <!-- <el-form-item label="取数日期范围" prop="startAndEndDate">
          <el-date-picker
            size="small"
            v-model="startAndEndDate"
            type="daterange"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期">
          </el-date-picker>
        </el-form-item> -->
        <el-form-item label="开始日期" prop="startDate">
          <el-date-picker
            size="small"
            v-model="editForm.startDate"
            type="date"
            placeholder="选择开始日期"
            value-format="yyyy-MM-dd"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="结束日期" prop="endDate">
          <el-date-picker
            size="small"
            v-model="editForm.endDate"
            type="date"
            placeholder="选择结束日期"
            value-format="yyyy-MM-dd"
          >
          </el-date-picker>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button size="small" @click="closeDialog('editForm')"
          >取消</el-button
        >
        <el-button
          size="small"
          type="primary"
          :loading="loading"
          class="title"
          @click="submitForm('editForm')"
          >保存</el-button
        >
      </div>
    </el-dialog>
  </div>
</template>

<script>
import {
  InterfileConfigList,
  InterfileConfigAdd,
  InterfileConfigUpdate,
  InterfileConfigDelete
} from "../../api/interfileMG";
import Pagination from "../../components/Pagination";
export default {
  data() {
    return {
      loading: false, //是显示加载
      editFormVisible: false, //控制编辑页面显示与隐藏
      editFlag: "EDIT",
      addFlag: "ADD",
      isEdit: false,
      title: "添加配置信息",
      executeFrequencyList: [
        { key: "请选择", value: "" },
        { key: "每天抽取", value: "1" },
        { key: "每周抽取", value: "2" },
        { key: "每月抽取", value: "3" }
      ],
      updateFlagList: [
        { key: "请选择", value: "" },
        { key: "是", value: "Y" },
        { key: "否", value: "N" }
      ],
      deleteFlagList: [
        { key: "请选择", value: "" },
        { key: "是", value: "Y" },
        { key: "否", value: "N" }
      ],
      dataTypeList: [
        { key: "请选择", value: "" },
        { key: "增量数据", value: "A" },
        { key: "全量数据", value: "I" }
      ],
      tableTypeList: [
        { key: "请选择", value: "" },
        { key: "状态表", value: "S" },
        { key: "流水表", value: "L" }
      ],
      statusList: [
        { key: "请选择", value: "" },
        { key: "未处理", value: "0" },
        { key: "成功", value: "1" },
        { key: "失败", value: "2" }
      ],
      startAndEndDate: "",
      editForm: {
        id: "",
        sendSysCode: "",
        dbName: "",
        userName: "",
        tableName: "",
        areaCode: "",
        dataCreateDate: "",
        updateFlag: "",
        deleteFlag: "",
        dataType: "",
        batchNo: "",
        fileSeqNo: "",
        primaryKeys: "",
        fieldNames: "",
        fieldAttrNames: "",
        status: "",
        executeFrequency: "",
        filePath: "",
        fileSuffix: "",
        queryConditionExpression: "",
        dataCount: "",
        pageSize: "",
        tableType: "",
        expression: "",
        checkPrimaryKeys: "",
        checkFieldNames: "",
        checkFieldAttrNames: "",
        remark: "",
        startDate: "",
        endDate: "",
        token: localStorage.getItem("logintoken")
      },
      // rules表单验证
      rules: {
        sendSysCode: [
          { required: true, message: "请输入发送方系统代码", trigger: "blur" }
        ],
        dbName: [
          { required: true, message: "请输入数据库名称", trigger: "blur" }
        ],
        // userName: [
        //   { required: true, message: "请输入数据库用户名称", trigger: "blur" }
        // ],
        tableName: [
          { required: true, message: "请输入接口数据表名称", trigger: "blur" }
        ],
        areaCode: [{ required: true, message: "请输入名称", trigger: "blur" }],
        dataCreateDate: [
          { required: true, message: "请输入数据创建日期", trigger: "blur" }
        ],
        updateFlag: [
          { required: true, message: "请选择是否更新", trigger: "blur" }
        ],
        deleteFlag: [
          { required: true, message: "请选择是否物理删除", trigger: "blur" }
        ],
        dataType: [
          { required: true, message: "请选择增全量标识", trigger: "blur" }
        ],
        primaryKeys: [
          { required: true, message: "请输入主键字段", trigger: "blur" }
        ],
        fieldNames: [
          { required: true, message: "请输入字段", trigger: "blur" }
        ],
        fieldAttrNames: [
          { required: true, message: "请输入字段属性", trigger: "blur" }
        ],
        status: [{ required: true, message: "请输入状态", trigger: "blur" }],
        executeFrequency: [
          { required: true, message: "请选择数据周期", trigger: "blur" }
        ],
        fileSuffix: [
          { required: true, message: "请输入数据文件后缀", trigger: "blur" }
        ],
        dataCount: [
          { required: true, message: "请输入文件数据量", trigger: "blur" }
        ],
        pageSize: [
          { required: true, message: "请输入单次取数数据量", trigger: "blur" }
        ],
        tableType: [
          { required: true, message: "请选择数据表类型", trigger: "blur" }
        ],
        expression: [
          { required: true, message: "请输入统计表达式", trigger: "blur" }
        ],
        checkPrimaryKeys: [
          { required: true, message: "请输入校验主键字段", trigger: "blur" }
        ],
        checkFieldNames: [
          { required: true, message: "请输入校验字段", trigger: "blur" }
        ],
        checkFieldAttrNames: [
          { required: true, message: "请输入校验字段属性", trigger: "blur" }
        ],
        remark: [{ required: true, message: "请输入备注", trigger: "blur" }],
        startAndEndDate: [
          { required: true, message: "请输入取数日期范围", trigger: "blur" }
        ]
      },
      formInline: {
        page: 1,
        limit: 10,
        token: localStorage.getItem("logintoken"),
        dbName: "",
        tableName: "",
        executeFrequency: ""
      },
      // 删除部门
      seletedata: {
        ids: "",
        token: localStorage.getItem("logintoken")
      },
      userparm: [], //搜索权限
      listData: [], //用户数据
      // 分页参数
      pageparm: {
        currentPage: 1,
        pageSize: 10,
        total: 10
      }
    };
  },
  // 注册组件
  components: {
    Pagination
  },
  /**
   * 数据发生改变
   */

  /**
   * 创建完毕
   */
  created() {
    this.getdata(this.formInline);
  },

  /**
   * 里面的方法只有被调用才会执行
   */
  methods: {
    // 获取配置列表
    getdata(parameter) {
      this.loading = true;
      /***
       * 调用接口
       */
      InterfileConfigList(parameter)
        .then(res => {
          this.loading = false;
          if (res.code == "000000") {
            this.listData = res.data;
            // 分页赋值
            this.pageparm.currentPage = this.formInline.page;
            this.pageparm.pageSize = this.formInline.limit;
            this.pageparm.total = res.count;
          } else {
            this.$message({
              type: "info",
              message: res.message
            });
          }
        })
        .catch(err => {
          this.loading = false;
          this.$message.error("菜单加载失败，请稍后再试！");
        });
    },
    // 分页插件事件
    callFather(parm) {
      this.formInline.page = parm.currentPage;
      this.formInline.limit = parm.pageSize;
      this.getdata(this.formInline);
    },
    // 搜索事件
    search() {
      this.getdata(this.formInline);
    },
    //显示编辑界面
    handleEdit: function(index, row, handleType) {
      this.editFormVisible = true;
      if (handleType == this.editFlag) {
        this.isEdit = true;
        if (row != undefined && row != "undefined") {
          this.title = "修改配置信息";
          this.editForm.id = row.id;
          this.editForm.sendSysCode = row.sendSysCode;
          this.editForm.dbName = row.dbName;
          this.editForm.userName = row.userName;
          this.editForm.tableName = row.tableName;
          this.editForm.areaCode = row.areaCode;
          this.editForm.dataCreateDate = row.dataCreateDate;
          this.editForm.updateFlag = row.updateFlag;
          this.editForm.deleteFlag = row.deleteFlag;
          this.editForm.dataType = row.dataType;
          this.editForm.batchNo = row.batchNo;
          this.editForm.fileSeqNo = row.fileSeqNo;
          this.editForm.primaryKeys = row.primaryKeys;
          this.editForm.fieldNames = row.fieldNames;
          this.editForm.fieldAttrNames = row.fieldAttrNames;
          this.editForm.status = row.status;
          this.editForm.executeFrequency = row.executeFrequency;
          this.editForm.filePath = row.filePath;
          this.editForm.fileSuffix = row.fileSuffix;
          this.editForm.queryConditionExpression = row.queryConditionExpression;
          this.editForm.dataCount = row.dataCount;
          this.editForm.pageSize = row.pageSize;
          this.editForm.tableType = row.tableType;
          this.editForm.expression = row.expression;
          this.editForm.checkPrimaryKeys = row.checkPrimaryKeys;
          this.editForm.checkFieldNames = row.checkFieldNames;
          this.editForm.checkFieldAttrNames = row.checkFieldAttrNames;
          this.editForm.remark = row.remark;
          this.editForm.startDate = row.startDate;
          this.editForm.endDate = row.endDate;
        }
      } else {
        this.isEdit = false;
        this.title = "添加配置信息";
        this.editForm.id = "";
        this.editForm.sendSysCode = "";
        this.editForm.dbName = "";
        this.editForm.userName = "";
        this.editForm.tableName = "";
        this.editForm.areaCode = "";
        this.editForm.dataCreateDate = "";
        this.editForm.updateFlag = "";
        this.editForm.deleteFlag = "";
        this.editForm.dataType = "";
        this.editForm.batchNo = "";
        this.editForm.fileSeqNo = "";
        this.editForm.primaryKeys = "";
        this.editForm.fieldNames = "FIELDNAMES";
        this.editForm.fieldAttrNames = "";
        this.editForm.status = "";
        this.editForm.executeFrequency = "";
        this.editForm.filePath = "";
        this.editForm.fileSuffix = "";
        this.editForm.queryConditionExpression = "";
        this.editForm.dataCount = "";
        this.editForm.pageSize = "";
        this.editForm.tableType = "";
        this.editForm.expression = "";
        this.editForm.checkPrimaryKeys = "";
        this.editForm.checkFieldNames = "CHECKFIELDNAMES";
        this.editForm.checkFieldAttrNames = "";
        this.editForm.remark = "";
        this.editForm.startDate = "";
        this.editForm.endDate = "";
      }
    },
    // 编辑、增加页面保存方法
    submitForm(editData) {
      this.$refs[editData].validate(valid => {
        if (valid) {
          if (this.isEdit) {
            this.updateConfigInfo();
          } else {
            this.addConfigInfo();
          }
        } else {
          return false;
        }
      });
    },
    // 更新配置信息
    updateConfigInfo() {
      InterfileConfigUpdate(this.editForm)
        .then(res => {
          this.editFormVisible = false;
          this.loading = false;
          if (res.code == "000000") {
            this.getdata(this.formInline);
            this.$message({
              type: "success",
              message: "文件配置信息更新成功！"
            });
          } else {
            this.$message({
              type: "info",
              message: res.message
            });
          }
        })
        .catch(err => {
          this.editFormVisible = false;
          this.loading = false;
          this.$message.error("文件配置信息更新失败，请稍后再试！");
        });
    },
    // 新增配置信息
    addConfigInfo() {
      InterfileConfigAdd(this.editForm)
        .then(res => {
          this.editFormVisible = false;
          this.loading = false;
          if (res.code == "000000") {
            this.getdata(this.formInline);
            this.$message({
              type: "success",
              message: "文件配置信息新增成功！"
            });
          } else {
            this.$message({
              type: "info",
              message: res.message
            });
          }
        })
        .catch(err => {
          this.editFormVisible = false;
          this.loading = false;
          this.$message.error("文件配置信息新增失败，请稍后再试！");
        });
    },
    // 删配置信息
    deleteConfigInfo(index, row) {
      this.$confirm("确定要删除吗?", "信息", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          InterfileConfigDelete(row.id)
            .then(res => {
              if (res.code == "000000") {
                this.$message({
                  type: "success",
                  message: "删除成功!"
                });
                this.getdata(this.formInline);
              } else {
                this.$message({
                  type: "info",
                  message: res.message
                });
              }
            })
            .catch(err => {
              this.loading = false;
              this.$message.error("文件配置信息删除失败，请稍后再试！");
            });
        })
        .catch(err1 => {
          console.log(err1);
          this.$message({
            type: "info",
            message: "已取消删除"
          });
        });
    },
    // 关闭编辑、增加弹出框
    closeDialog(formName) {
      this.editFormVisible = false;
      this.$refs[formName].resetFields();
    },
    listField(index, row) {
      this.$router.push({
        path: "/fieldconfig/FieldConfig",
        query: { fileId: row.id }
      });
    }
  }
};
</script>

<style scoped>
.user-search {
  margin-top: 20px;
}
.userRole {
  width: 100%;
}
</style>
